package com.songqintuan.platform.genl;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;

import com.songqintuan.common.util.MessageFactory;
import com.songqintuan.platform.common.constant.PlatformConstants;

@SuppressWarnings("serial")
@ManagedBean(name="existAuthorityResourcesType")
@ApplicationScoped
public class ExistAuthorityResourcesTypeBean implements java.io.Serializable {

	private SelectItem[] typeItems;

	public SelectItem[] getTypeItems() {
		return typeItems;
	}

	public void setTypeItems(SelectItem[] typeItems) {
		this.typeItems = typeItems;
	}

	public ExistAuthorityResourcesTypeBean() {
		
		SelectItem[] tempTypeItems = new SelectItem[2];
		//set select default 
		
		String oneTypeN18 = MessageFactory.getMessage(PlatformConstants.USER_BUNDLE_NAME,"resource.type.group.value", FacesMessage.SEVERITY_ERROR).getDetail();
		tempTypeItems[0] = new SelectItem("G",oneTypeN18);
		String twoTypeN18 = MessageFactory.getMessage(PlatformConstants.USER_BUNDLE_NAME,"resource.type.item.value", FacesMessage.SEVERITY_ERROR).getDetail();
		tempTypeItems[1] = new SelectItem("I",twoTypeN18);

		this.setTypeItems(tempTypeItems);
	}
}
